import { Message, MessageBox } from 'element-ui'
export async function isConfirm(msg) {
  const confirmResult = await MessageBox.confirm(msg, '提示', {
    confirmButtonText: '确定',
    cancelButtonText: '取消',
    type: 'warning'
  }).catch((error) => error)
  if (confirmResult !== 'confirm') {
    Message.info('用户取消了操作')
    return false
  }
  return true
}

